package com.ztjy.market.dao;

import com.ztjy.bean.Orders;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.sql.Date;
import java.util.List;
@Mapper
@Repository
public interface OrdersDao {
    /**
     * 模糊查询    查询字段：订单编号，客户姓名，订购时间区间段，订购金额区间段，审核状态
     * @param orders
     * @return
     */
    public List<Orders> findAllOrders(@Param("o") Orders orders, @Param("ordertimeMin") Date ordertimeMin, @Param("ordertimeMax") Date ordertimeMax, @Param("ordermoneyMin") Double ordermoneyMin, @Param("ordermoneyMax") Double ordermoneyMax);

    /**
     * 添加订单
     * @param orders
     * @return
     */
    public boolean addOrders(Orders orders);

    /**
     * 根据订单编号查看订单详情
     * @param orderid
     * @return
     */
    public Orders findOrderDetails(String orderid);

    /**
     * 修改订单
     * @param orders
     * @return
     */
    public boolean updateOrders(Orders orders);

    /**
     * 删除订单
     * @param orderid
     * @return
     */
    public boolean delOrders(String orderid);





    public Orders findOrderById(String orderid);


}